<!DOCTYPE HTML>
<html>
 <head>
  <title>Web Storage</title>
  <script src="/resources/testharness.js"></script>
  <script src="/resources/testharnessreport.js"></script>
 </head>
 <body>
    <h1>storage_session_removeItem</h1>
    <div id="log"></div>
    <script>
        test(function() {
            sessionStorage.clear();
            sessionStorage.setItem("name", "user1");
            assert_equals(sessionStorage.getItem("name"), "user1");

            test(function() {
                delete sessionStorage["name"];
                delete sessionStorage["unknown"];
                assert_equals(sessionStorage.getItem("name"), null, "sessionStorage.getItem('name')")
            });
            test(function() {
                sessionStorage.setItem("null", "test");
                assert_true("null" in sessionStorage);
                sessionStorage.removeItem(null, "test");
                assert_false("null" in sessionStorage);
            });
            test(function() {
                sessionStorage.setItem("undefined", "test");
                assert_true("undefined" in sessionStorage);
                sessionStorage.removeItem(undefined, "test");
                assert_false("undefined" in sessionStorage);
            });
        });
    </script>
 </body>
</html>
